{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nfunction isPointsEq(a1, a2, isAlignPoint) {\n  if (isAlignPoint) {\n    return a1[0] === a2[0];\n  }\n  return a1[0] === a2[0] && a1[1] === a2[1];\n}\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n  var baseAlign = builtinPlacements[placementStr] || {};\n  return _objectSpread(_objectSpread({}, baseAlign), align);\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n  var points = align.points;\n  var placements = Object.keys(builtinPlacements);\n  for (var i = 0; i < placements.length; i += 1) {\n    var placement = placements[i];\n    if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n      return \"\".concat(prefixCls, \"-placement-\").concat(placement);\n    }\n  }\n  return '';\n}","map":{"version":3,"names":["_objectSpread","isPointsEq","a1","a2","isAlignPoint","getAlignFromPlacement","builtinPlacements","placementStr","align","baseAlign","getAlignPopupClassName","prefixCls","points","placements","Object","keys","i","length","placement","concat"],"sources":["/data/messenger.client/node_modules/rc-trigger/es/utils/alignUtil.js"],"sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\n\nfunction isPointsEq(a1, a2, isAlignPoint) {\n  if (isAlignPoint) {\n    return a1[0] === a2[0];\n  }\n\n  return a1[0] === a2[0] && a1[1] === a2[1];\n}\n\nexport function getAlignFromPlacement(builtinPlacements, placementStr, align) {\n  var baseAlign = builtinPlacements[placementStr] || {};\n  return _objectSpread(_objectSpread({}, baseAlign), align);\n}\nexport function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {\n  var points = align.points;\n  var placements = Object.keys(builtinPlacements);\n\n  for (var i = 0; i < placements.length; i += 1) {\n    var placement = placements[i];\n\n    if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {\n      return \"\".concat(prefixCls, \"-placement-\").concat(placement);\n    }\n  }\n\n  return '';\n}"],"mappings":"AAAA,OAAOA,aAAa,MAAM,0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